home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / t-adainc / s-tasren.ads < prev    next >
Text File  |  1994-05-19  |  5KB  |  116 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --             S Y S T E M . T A S K I N G . R E N D E Z V O U S            --
  6. --                                                                          --
  7. --                                  S p e c                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.7 $                             --
  10. --                                                                          --
  11. --           Copyright (c) 1991,1992,1993, FSU, All Rights Reserved         --
  12. --                                                                          --
  13. --  GNARL is free software; you can redistribute it and/or modify it  under --
  14. --  terms  of  the  GNU  Library General Public License as published by the --
  15. --  Free Software Foundation; either version 2, or  (at  your  option)  any --
  16. --  later  version.   GNARL is distributed in the hope that it will be use- --
  17. --  ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of --
  18. --  MERCHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Gen- --
  19. --  eral Library Public License for more details.  You should have received --
  20. --  a  copy of the GNU Library General Public License along with GNARL; see --
  21. --  file COPYING. If not, write to the Free Software Foundation,  675  Mass --
  22. --  Ave, Cambridge, MA 02139, USA.                                          --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. package System.Tasking.Rendezvous is
  27.    --  This interface is described in the document
  28.    --  Gnu Ada Runtime Library Interface (GNARLI).
  29.  
  30.    procedure Task_Entry_Call
  31.      (Acceptor              : Task_ID;
  32.       E                     : Task_Entry_Index;
  33.       Uninterpreted_Data    : System.Address;
  34.       Mode                  : Call_Modes;
  35.       Rendezvous_Successful : out Boolean);
  36.    --  General entry call
  37.  
  38.    procedure Call_Simple
  39.      (Acceptor           : Task_ID;
  40.       E                  : Task_Entry_Index;
  41.       Uninterpreted_Data : System.Address);
  42.    --  Simple entry call
  43.  
  44.    procedure Cancel_Task_Entry_Call (Cancelled : out Boolean);
  45.    --  Cancel pending task entry call
  46.  
  47.    procedure Requeue_Task_Entry
  48.      (Acceptor   : Task_ID;
  49.       E          : Task_Entry_Index;
  50.       With_Abort : Boolean);
  51.  
  52.    procedure Requeue_Protected_To_Task_Entry
  53.      (Object     : Protection_Access;
  54.       Acceptor   : Task_ID;
  55.       E          : Task_Entry_Index;
  56.       With_Abort : Boolean);
  57.  
  58.    procedure Selective_Wait
  59.      (Open_Accepts       : Accept_List_Access;
  60.       Select_Mode        : Select_Modes;
  61.       Uninterpreted_Data : out System.Address;
  62.       Index              : out Select_Index);
  63.    --  Selective wait
  64.  
  65.    procedure Accept_Call
  66.      (E                  : Task_Entry_Index;
  67.       Uninterpreted_Data : out System.Address);
  68.    --  Accept an entry call
  69.  
  70.    procedure Accept_Trivial (E : Task_Entry_Index);
  71.    --  Accept an entry call that has no parameters and no body
  72.  
  73.    function Task_Count (E : Task_Entry_Index) return Natural;
  74.    --  Return number of tasks waiting on the entry E (of current task)
  75.  
  76.    function Callable (T : Task_ID) return Boolean;
  77.    --  Return T'CALLABLE
  78.  
  79.    procedure Complete_Rendezvous;
  80.    --  Called by acceptor to wake up caller
  81.  
  82.    procedure Exceptional_Complete_Rendezvous (Ex : Exception_ID);
  83.    --  Called by acceptor to mark the end of the current rendezvous and
  84.    --  propagate an exception to the caller.
  85.  
  86.    --------------------------------
  87.    --  RTS Internal Declarations --
  88.    --------------------------------
  89.  
  90.    --  These declarations are not part of the GNARLI
  91.  
  92.    procedure Close_Entries (Target : Task_ID);
  93.    --  Close entries, purge entry queues (called by Task_Stages.Complete)
  94.    --  T.Stage must be Completing before this is called.
  95.  
  96.    procedure Complete_on_Sync_Point (T : Task_ID);
  97.    --  If a task is suspended on an accept, select, or entry call
  98.    --  (but not yet *in* rendezvous) then complete the task.
  99.  
  100.    procedure Reset_Priority
  101.      (Acceptor_Prev_Priority : Rendezvous_Priority;
  102.       Acceptor               : Task_ID);
  103.    pragma Inline (Reset_Priority);
  104.    --  Reset priority to original value (not part of the CARTS interface)
  105.  
  106.    procedure Terminate_Alternative;
  107.    --  Called when terminate alternative is selected.
  108.    --  Waits for dependents to either terminate
  109.    --  or also select a terminate alternative.
  110.    --  Assumes that abortion is deferred when called.
  111.  
  112.    procedure Complete (Target : Task_ID);
  113.    --  Complete task and act on pending abortion.
  114.  
  115. end System.Tasking.Rendezvous;
  116.